<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <title>志愿一点通</title>
    <link href="${ctxStatic}/bootstrap/3.3.2/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="${ctxStatic}/app/css/master.css">
    <style>
        #scoreModal .modal-dialog{
            margin-top: 40%;
            margin-left: 20%;
            width: 60%;
        }
    </style>
</head>
<body>
<nav class="topbar bluebg">
    <a class="icon-arrow icon-return" href="javascript:history.go(-1);"></a>
    <h1>${school.schoolName}</h1>
    <a class="nav-right" href="javascript:;" onclick="favorite('school','','${school.schoolCode}','${school.schoolCodeSn}','');">收藏</a>
</nav>

<div class="wrap">
    <div class="picbox">
        <img class="schoolpic" src="${ctxStatic}/app/images/schoolpic_001.jpg">
        <div class="titlebox">
            <img class="school-icon flt" src="${school.schoolLogo}" >
            <div class="school-master flt">
                <h1>${school.schoolName}</h1>
                <div class="school-rank clearfix">
                    <span class="flt">
                        <c:choose>
                            <c:when test="${userMain.kmType eq '1'}">No.${school.schoolWenRank}</c:when>
                            <c:when test="${userMain.kmType eq '5'}">No.${school.schoolRanking}</c:when>
                            <c:otherwise>No.${school.schoolRanking}</c:otherwise>
                        </c:choose>
                    </span>
                    <span class="frt">隶属于：${school.owns}</span>
                </div>
                <div class="school-tag">
                    <span>${school.provinceName}</span>
                    <c:if test="${not empty school.cityName}">
                        <span>${school.cityName}</span>
                    </c:if>
                    <c:if test="${school.flag211 eq '1'}">
                        <span>211</span>
                    </c:if>
                    <c:if test="${school.flag985 eq '1'}">
                        <span>985</span>
                    </c:if>
                    <c:if test="${school.flagYan eq '1'}">
                        <span>研</span>
                    </c:if>
                    <span>${fns:getDictLabel(school.schoolType,'school_type','综合')}</span>
                </div>
            </div>
        </div>
    </div>

    <div class="parabox fffbg clearfix">
        <div class="percentbox flt">
            <div class="circle">
                <div class="pie_left"><div class="left"></div></div>
                <div class="pie_right"><div class="right"></div></div>
                <div class="mask">
                    <p class="mask-val">
                        <c:if test="${!empty lqRate}">
                            <span><fmt:formatNumber value="${lqRate}" maxFractionDigits="1" /></span>%
                            <p class="mask-des">录取率</p>
                        </c:if>
                        <c:if test="${empty lqRate}">
                            暂无信息
                        </c:if>
                    </p>
                </div>
            </div>
        </div>
        <div class="score-line frt">
            <div class="score-val">
                <div class="fs18 green">${userMain.gkScore}</div>
                <div class="score-des">我的分数</div>
            </div>
            <div class="score-val">
                <div class="fs18 red">${forecastScore}</div>
                <div class="score-des">预测线</div>
            </div>
        </div>
    </div>

    <div class="chartbox"></div>

    <div class="school-para">
        <table class="table">
            <thead>
            <tr style="color: #ff0000;">
                <th colspan="3">
                    <c:choose>
                        <c:when test="${userMain.kmType eq '5'}">理科专业录取分数</c:when>
                        <c:otherwise>文科专业录取分数</c:otherwise>
                    </c:choose>
                </th>
                <th colspan="4">以下分数是平均等效分</th>
            </tr>
            <tr>
                <th>专业</th>
                <th>重点</th>
                <th>特色</th>
                <th>${year}</th>
                <th>${year-1}</th>
                <th>${year-2}</th>
                <th>关注</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${schoolMajorList}" var="item">
                <tr>
                    <td><a href="${wechat}/majorDetail?majorCode=${item.majorCode}"></a>${item.majorName}</td>
                    <td><c:if test="${item.isKeyPoint eq '1'}">√</c:if></td>
                    <td><c:if test="${item.isCharacteristic eq '1'}">√</c:if></td>
                    <td>
                        <c:choose>
                            <c:when test="${not empty item.firstMin}">${item.firstMin}</c:when>
                            <c:otherwise>----</c:otherwise>
                        </c:choose>
                    </td>
                    <td>
                        <c:choose>
                            <c:when test="${not empty item.secondMin}">${item.secondMin}</c:when>
                            <c:otherwise>----</c:otherwise>
                        </c:choose>
                    </td>
                    <td>
                        <c:choose>
                            <c:when test="${not empty item.thirdMin}">${item.thirdMin}</c:when>
                            <c:otherwise>----</c:otherwise>
                        </c:choose>
                    </td>
                    <td><i class="icon-star" onclick="favoriteMajor('major','','','','${item.majorCode}',this);"></i></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>

    <div class="school-point fffbg">
        <ul class="clearfix">
            <li>
                <div class="sp-val">${school.masterPoint}</div>
                <span>硕士点</span>
            </li>
            <li>
                <div class="sp-val">${school.doctorPoint}</div>
                <span>博士点</span>
            </li>
            <li>
                <div class="sp-val">${school.zdxkNum}</div>
                <span>重点学科</span>
            </li>
        </ul>
    </div>

    <div class="gender-ratio fffbg clearfix">
        <div class="gender flt">
            <i class="icons icon-nv"></i>
            <div class="gender-des">女生数</div>
        </div>
        <div class="ratio-val flt">
            <p class="p1">VS</p>
            <p class="p2"><fmt:formatNumber value="${school.female*100}" maxFractionDigits="0" />:<fmt:formatNumber value="${school.male*100}" maxFractionDigits="0" /> </p>
        </div>
        <div class="gender flt">
            <i class="icons icon-nan"></i>
            <div class="gender-des">男生数</div>
        </div>
    </div>

    <div class="school-brief fffbg">
        <h3>学校简介</h3>
        <div class="school-data">
            <p class="p1">隶属：<span>${school.owns}</span></p>
            <p class="p1">类型：<span>${fns:getDictLabel(school.schoolType,'school_type','综合')}</span></p>
            <p class="p1">地址：<span>${school.schoolAddr}</span></p>
            <p class="p1">电话：<span>${school.schoolTel}</span></p>
            <p class="p2">网址：<a href="${school.schoolUrl}">${school.schoolUrl}</a></p>
        </div>
    </div>
</div>
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/bootstrap/3.3.2/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/app/js/main.js" type="text/javascript"></script>
</body>
</html>